package com.shopping_back.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 物流主表
 * </p>
 *
 * @author Jack
 * @since 2025-07-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("delivery")
public class Delivery implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 关联订单ID
     */
    @TableId(value = "order_id", type = IdType.AUTO)
    private Long orderId;

    /**
     * 物流单号
     */
    private String deliverySn;

    /**
     * 配送方式(1快递 2自提)
     */
    private Integer deliveryType;

    /**
     * 发件人信息
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private String senderInfo;

    /**
     * 收件人信息
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private String receiverInfo;

    /**
     * 状态(0未发货 1运输中 2已签收)
     */
    private Integer status;

    /**
     * 发货时间
     */
    private LocalDateTime shippingTime;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;


}
